<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      usbutils-012
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;12.&nbsp;System Utilities
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="upower.html" title="UPower-0.99.11">Prev</a>
          <p>
            UPower-0.99.11
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="which.html" title=
          "Which-2.21 and Alternatives">Next</a>
          <p>
            Which-2.21 and Alternatives
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="usbutils" name="usbutils"></a>usbutils-012
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to USB Utils
        </h2>
        <p>
          The <span class="application">USB Utils</span> package contains
          utilities used to display information about USB buses in the system
          and the devices connected to them.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://www.kernel.org/pub/linux/utils/usb/usbutils/usbutils-012.tar.xz">
                https://www.kernel.org/pub/linux/utils/usb/usbutils/usbutils-012.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 0da98eb80159071fdbb00905390509d9
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 100 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 6.6 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          USB Utils Dependencies
        </h3>
        <p class="required">
          <a class="xref" href="libusb.html" title=
          "libusb-1.0.23">libusb-1.0.23</a> and <a class="xref" href=
          "../basicnet/wget.html" title="Wget-1.20.3">Wget-1.20.3</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/usbutils">http://wiki.linuxfromscratch.org/blfs/wiki/usbutils</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of USB Utils
        </h2>
        <p>
          Install <span class="application">USB Utils</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class=
"command">./autogen.sh --prefix=/usr --datadir=/usr/share/hwdata &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
        <p>
          To install the <code class="filename">usb.ids</code> data file,
          using <a class="xref" href="../basicnet/wget.html" title=
          "Wget-1.20.3">Wget-1.20.3</a>, run, as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">install -dm755 /usr/share/hwdata/ &amp;&amp;
wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</kbd>
</pre>
        <p>
          The script <span class="command"><strong>lsusb.py</strong></span>
          displays information in a more easily readable form than
          <span class="command"><strong>lsusb</strong></span>. To find the
          options, use <span class="command"><strong>lsusb.py
          -h</strong></span>. One form of use recommended by the developer is
          <span class="command"><strong>lsusb.py -ciu</strong></span>.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring USB Utils
        </h2>
        <p>
          The <code class="filename">usb.ids</code> data file is constantly
          being updated. To get a current version of this file, using
          <a class="xref" href="../basicnet/wget.html" title=
          "Wget-1.20.3">Wget-1.20.3</a>, periodically run again, as the
          <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class=
"command">wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</kbd>
</pre>
        <p>
          You should update the <code class=
          "filename">/usr/share/hwdata/usb.ids</code> file periodically.
          <span class="phrase">If you've installed <a class="xref" href=
          "fcron.html" title="Fcron-3.2.1">Fcron-3.2.1</a> and completed the
          section on periodic jobs, execute</span> the following commands, as
          the <code class="systemitem">root</code> user, to create a
          <span class="phrase">weekly cron job:</span>
        </p>
        <pre class="root">
<kbd class=
"command">cat &gt; /etc/cron.weekly/update-usbids.sh &lt;&lt; "EOF" &amp;&amp;
<code class="literal">#!/bin/bash
/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</code>
EOF
chmod 754 /etc/cron.weekly/update-usbids.sh</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">lsusb, lsusb.py, usb-devices, and
              usbhid-dump</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">None</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="lsusb" name="lsusb"></a><span class=
                    "term"><span class=
                    "command"><strong>lsusb</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a utility for displaying information about all USB
                    buses in the system and all devices connected to them,
                    but not in human friendly form.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="lsusb.py" name="lsusb.py"></a><span class=
                    "term"><span class=
                    "command"><strong>lsusb.py</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    displays information about all USB buses in the system
                    and all devices connected to them in reasonable human
                    friendly form.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="usb-devices" name="usb-devices"></a><span class=
                    "term"><span class=
                    "command"><strong>usb-devices</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a shell script that displays details of USB buses and
                    devices connected to them. It is designed to be used if
                    /proc/bus/usb/devices is not available on your system.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="usbhid-dump" name="usbhid-dump"></a><span class=
                    "term"><span class=
                    "command"><strong>usbhid-dump</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to dump report descriptors and streams from HID
                    (human interface device) interfaces of USB devices.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-16 18:46:23 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="upower.html" title="UPower-0.99.11">Prev</a>
          <p>
            UPower-0.99.11
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="which.html" title=
          "Which-2.21 and Alternatives">Next</a>
          <p>
            Which-2.21 and Alternatives
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
